<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:63:"D:\phpStudy\WWW\auth/application/web\view\store_menu\index.html";i:1496201810;s:58:"D:\phpStudy\WWW\auth/application/web\view\public\base.html";i:1496201802;s:61:"D:\phpStudy\WWW\auth/application/web\view\Store_Menu\top.html";i:1496201819;}*/ ?>
<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="renderer" content="webkit">
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<title>商家后台管理</title>
		<meta name="keywords" content="">
		<meta name="description" content="">
		<!--[if lt IE 9]>
    	<meta http-equiv="refresh" content="0;ie.html" />
    	<![endif]-->
		<link rel="shortcut icon" href="favicon.ico">
		<link href="__CSS__/bootstrap.min.css" rel="stylesheet">
		<link href="__CSS__/font-awesome.min.css" rel="stylesheet">
		<link href="__CSS__/animate.min.css" rel="stylesheet">
		<link href="__CSS__/style.min.css" rel="stylesheet">
		<link href="__CSS__/admin.css" rel="stylesheet">
	</head>
	<style>
		.lactive {
			background: #293846;
			color: #FFFFFF;
			border-bottom: solid 2px #1ab394
		}
		
		.lactive> a {
			color: #ffffff!important;
		}
	</style>

	<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
		<div id="wrapper">
			<!--左侧导航开始-->
			<div class="navbar_top_nav">
				<ul class="nav navbar-top-links navbar-left">
					<li class="nspecial">
						<span class="block m-t-xs"><strong class="font-bold">
							<?php echo session('storeInfo')['store_name']; if($chainsotrename!==''): ?>
							(<?php echo $chainsotrename; ?>)
							<?php endif; ?>
						</strong></span>
					</li>
					<li class="hidden-xs" id='shouye'>
						<a href="<?php echo url('index/index'); ?>">
							&nbsp;&nbsp;<i class="fa fa-home"></i>首页&nbsp;&nbsp;
						</a>
					</li>
					<?php if(is_array($store_top_menus) || $store_top_menus instanceof \think\Collection): if( count($store_top_menus)==0 ) : echo "" ;else: foreach($store_top_menus as $key=>$st): ?>
					<li id="top_menu<?php echo $st['id']; ?>">
						<a href="/<?php echo $st['name']; ?>?top_menu_id=<?php echo $st['id']; ?>"><i class='<?php echo $st['icon']; ?>'></i><?php echo $st['title']; ?></a>
					</li>
					<?php endforeach; endif; else: echo "" ;endif; ?>
				</ul>
				<ul class="nav navbar-top-links navbar-right">
					<li class="hidden-xs">
						<a href="/help" target="_blank">
							<i class="fa fa-chain"></i>帮助文档
						</a>
					</li>

					<li class="hidden-xs">
							<a data-toggle="dropdown" href="#">
								<i class="fa fa-chain"></i>系统管理<b class="caret"></b>
							</a>
							<ul class="dropdown-menu animated fadeInRight m-t-xs">
								<li>
									<a onclick="jiaoban()" }>
										<i class="fa fa-chain"></i>交班
									</a>
								</li>
								<li class="divider"></li>
								<li>
									<a href="<?php echo url('index/clear'); ?>">
										<i class="fa fa-refresh"></i>清除缓存
									</a>
								</li>
								<li>
									<a href="<?php echo url('login/logout'); ?>"><i class="fa fa-sign-out"></i>退出系统</a>
								</li>
							</ul>
					</li>
				</ul>

			</div>
			<nav class="navbar-default navbar-static-side" role="navigation" style="margin-top: 60px;">

				<div class="sidebar-collapse">
					<ul class="nav" id="side-menu">

						<li class="menu" style="text-align: center; background-color:#08575B;">
							<a class="navbar-minimalize" href="#" style="text-align: center; background-color:#08575B;">
								<i class="fa fa-bars"></i>
							</a>
						</li>
						<?php if(!empty($menu)): if(is_array($menu) || $menu instanceof \think\Collection): if( count($menu)==0 ) : echo "" ;else: foreach($menu as $key=>$vo): ?>
						<li class="menu" style="text-align:left">
							<a href="/<?php echo $vo['name']; ?>?top_menu_id=<?php echo $top_menu_id; ?>">
								<i class="<?php echo $vo['icon']; ?>" style="width: 15px;"></i>
								<span class="nav-label"><?php echo $vo['title']; ?>&nbsp;&nbsp; </span>
							</a>
						</li>
						<?php endforeach; endif; else: echo "" ;endif; endif; ?>
					</ul>
				</div>
			</nav>
			<!--左侧导航结束-->
			<!--右侧部分开始-->
			<div id="page-wrapper" class="gray-bg dashbard-1">
				<div class="row border-bottom" style="display: none;">
					<nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0;">
						<div class="navbar-header">
							<a class="navbar-minimalize " href="#">
							</a>
						</div>

					</nav>
				</div>
				<div class="row" style="margin-top: 66px;">
					
 <div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="<?php echo url('index/index'); ?>"><i class="fa fa-home"></i></a>
		</li>
		<li><strong>店铺菜单列表</strong></li>
	</ol>
</div>
<div class="ibox-title">
	<ul class="nav nav-tabs">
		<li id="li-bar-index">
			<a href="<?php echo url('StoreMenu/index'); ?>">首页菜单</a>
		</li>
		<li id="li-bar-card">
			<a href="<?php echo url('template/index'); ?>">模板设置</a>
		</li>
		<li id="li-bar-detail">
			<a href="<?php echo url('about/index'); ?>">软文推广</a>
		</li>
		<li id="li-bar-detail2">
			<a href="<?php echo url('new/index'); ?>">新闻管理</a>
		</li>
		<li id="li-bar-detail3">
			<a href="<?php echo url('agent/beit'); ?>">背景图片设置</a>
		</li>
	</ul>
</div>
<div class="ibox float-e-margins">
	<div class="ibox-content">
		<?php if($count < 6): ?>
		<div class="row">
			<div class="col-sm-12">
				<div class="col-sm-2">
					<div class="input-group">
						<a href="<?php echo url('add'); ?>" class="btn btn-primary btn-outline">添加</a>
					</div>
				</div>
			</div>
		</div>
		<?php endif; ?>
		<div class="hr-line-dashed"></div>
            <div class="example-wrap">
                <div class="example">
                    <table class="table table-bordered table-hover">
                        <thead>
                            <tr class="long-tr">
                                <th>id</th>
                                <th>名称</th>
                                <th>图片</th>
                                <th>链接地址</th>
                                <th>状态</th>
								<th>排序</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody id="list">
                        	<?php if(is_array($list) || $list instanceof \think\Collection): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ad): $mod = ($i % 2 );++$i;?>
                        	<tr>
                        		<td><?php echo $ad['id']; ?></td>
                        		<td><?php echo $ad['name']; ?></td>
                        		<td><img src="<?php echo $ad['thumb']; ?>" width="50px"/></td>                       		
                        		<td><?php echo $ad['url']; ?></td>
                        		<td>
                        			<?php if($ad['status'] == 1): ?>
                        		 	显示
                        		 	<?php else: ?>
                        		 	不显示
                        		 	<?php endif; ?>
                        		</td>
                        		<td><?php echo $ad['sort']; ?></td>
                        		<td>	
                        			<a href="<?php echo url('edit',['id'=>$ad['id']]); ?>" class="btn btn-primary bnt-sm">
										<i class="fa fa-paste"></i> 编辑</a>&nbsp;&nbsp; <?php if($vo['id'] != 1): ?>
									<a href="<?php echo url('delete',['id'=>$ad['id']]); ?>" class="btn btn-danger bnt-sm ajax-delete">
										<i class="fa fa-trash-o"></i> 删除</a>
									<?php endif; ?>
                        		</td>
                        	</tr>
                        	<?php endforeach; endif; else: echo "" ;endif; ?>
                        </tbody>
                    </table>
                    <div style="color: #337ab7">
                  		备注：只能添加6个首页菜单
                    </div>
                    <div style="text-align: right;">
                      <?php echo $list->render(); ?>
                    </div>
                </div>
            </div>
            </div>
</div>

				</div>
			</div>
			<!--右侧部分结束-->
		</div>
		<div class="footer">
			<div class="pull-right"> 版权所有 Project &copy; 2017-2020 版权所有</div>
		</div>
		<script src="__JS__/jquery.min.js"></script>
		<script src="__JS__/bootstrap.min.js"></script>
		<script src="__JS__/jquery.metisMenu.js"></script>
		<script src="__JS__/jquery.slimscroll.min.js"></script>
		<script src="__LIB__/layer/layer.js"></script>
		<script src="__JS__/core.min.js"></script>
		<script src="__JS__/pace.min.js"></script>
		<script src="__JS__/autocomplete.js"></script>
		<script>
			// 文件上传URL
			var __UPLOAD_URL__ = "<?php echo url('web/upload/index'); ?>";
			var __CURRENT_URL__ = "<?php echo $current_url; ?>";
			console.log(__CURRENT_URL__);
		</script>
		<script src="__JS__/admin.js"></script>
		<script>
			var show = "<?php echo $is_show_left; ?>";
			if(show == 0) {
				$("body").toggleClass("mini-navbar"), SmoothlyMenu();
			}
		</script>
		<script>
			var top_menu_id = "<?php echo $top_menu_id; ?>";
			$(".lactive").removeClass("lactive");
			if(top_menu_id != "") {
				$("#top_menu" + top_menu_id).addClass("lactive");
			} else {
				$("#shouye").addClass("lactive");
			}
			//交班操作
			function jiaoban1() {
				layer.open({
					type: 2,
					id: "jioaban_list",
					area: ['750px', '350px'],
					title: '收入',
					scrollbar: false,
					content: '/web/index/jiaoban_list' //这里content是一个URL，如果你不想让iframe出现滚动条，你还可以content: ['http://sentsin.com', 'no']
				});
			}

			function jiaoban() {
				$.ajax({
					url: '/web/index/jiaoban_list',
					data: {},
					type: "post",
					success: function(data) {
						var info = data.data;
						var html = '<div class="input-group m-b" style="width:100%;text-align: center;">' +
							'<span style="color: red;font-size: 20px;">￥' +
							'<span id="total_price" style="color: red;font-size: 50px;" class="b_rs_pan">' + info.zsr + '</span></span>' +
							'</br><span>工作时间：' + info.startime + '至' + info.endtime + '</span>' +
							'</div>' +
							'<table class="table table-bordered table-hover">' +
							'<thead>' +
							'<tr class="long-th">' +
							'<th>现金</br>￥' + info.xianjin + '</th>' +
							'<th>银行卡</br>￥' + info.yinhangka + '</th>' +
							'<th>微信</br>￥' + info.weixin + '</th>' +
							'<th>支付宝</br>￥' + info.zhifubao + '</th>' +
							'<th>自定义</br>￥' + info.zidingyi + '</th>' +
							'</tr>' +
							'</thead>' +
							'</table>';
						var index = layer.open({
							title: '确认交班',
							zIndex: "addjb",
							area: ['750px', '300px'],
							content: html,
							btn: ['确定', '取消'],
							yes: function(index, layero) {
								//按钮【按钮一】的回调
								$.ajax({
									url: '/web/index/addjb',
									data: {
										total_icome: info.zsr,
										cash: info.xianjin,
										card_icome: info.yinhangka,
										wx_icome: info.weixin,
										zfb_icome: info.zhifubao,
										zdy_icome: info.zidingyi
									},
									type: "post",
									success: function(data) {
										layer.close(index);
										callback1(data);
									}
								})
							},
							btn2: function(index, layero) {
								layer.close(index);
							}
						});
					}
				});
			}

			function callback1(data) {
				if(data.code == 200) {
					var info = data.data;
					var html = '<div>' +
						'<div style="text-align: center;">' +
						'<i class="fa fa-check" style="color: #35b12c;font-size: 60px;font-weight: 600;"></i>' +
						'<p><span class="b_rs_pan">交班成功</span> </p>' +
						'</div>' +
						'<div class="form-group" style="padding-left: 100px;"><label class="col-sm-5 control-label">交班时间：</label><div class="input-group col-sm-7">' + info.time + '</div></div>' +
						'<div class="form-group" style="padding-left: 100px;"><label class="col-sm-5 control-label">操作员：</label><div class="input-group col-sm-7">' + info.mobile + '</div></div>' +
						'<div class="form-group" style="padding-left: 100px;"><label class="col-sm-5 control-label">收入(元)：</label><div class="input-group col-sm-7">' + info.zsr + '</div></div>' +
						'</div>';
					var index = layer.open({
						title: '交班成功',
						area: ['500px', '350px'],
						content: html,
						btn: ['我知道了'],
						yes: function(index, layero) {
							layer.close(index);
						}
					});

				} else {
					layer.msg(data.msg);
					window.reload();
				}

			}
		</script>
		

<script>
$("#li-bar-index").addClass("active");
</script>
<style>
.bank{
	width: 150px;
    height:30px;
    text-align:center;
    border-radius:5px;
}
</style>


	</body>

</html>